#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QtGui/QMainWindow>
#include "gamesettingswidget.h"
#include "pickgamemodewidget.h"
#include "gamewidget.h"
#include "loginwidget.h"
#include "networkmodule.h"
#include "mainscreenwidget.h"
#include "challengeroom.h"

class QStackedWidget;

class MainWindow : public QMainWindow
{
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
private slots:
    void toSettings();
    void toMainWidget();
    void toGameWidgetSingle();
    void toGameWidgetMultiplayer();
    void toPickGameMode();
    void toLoginWidget();
    void toChallengeRoomWidget();
    void handleConnectionError();
private:
    //the screen widgets that are switched during the game flow
    QStackedWidget *stackedWidget;
    MainScreenWidget *mainScreenWidget;
    GameSettingsWidget *gameSettingsWidget;
    PickGameModeWidget *pickGameModeWidget;
    GameWidget *gameWidget;
    LoginWidget *loginWidget;
    NetworkModule *networkModule;
    ChallengeRoom *challengeRoom;
};

#endif // MAINWINDOW_H
